package com.demo3;import org.springframework.stereotype.Component;import javax.annotation.PostConstruct;import javax.annotation.PreDestroy;@Componentpublic class AComponent {    @PostConstruct    public void postConstruct()    {        System.out.println("A对象初始化...");    }    @PreDestroy    public void preDestroy()    {        System.out.println("A对象销毁...");    }}